import request from "../../utils/request.js";

//获取列表
export function getArea(params) {
  return request({
    url: "/parking/area/list",
    method: "get",
    params
  });
}
//添加区域
export function addArea(data) {
  return request({
    url: "/parking/area",
    method: "post",
    data
  });
}
//获取计费规则
export function getRule() {
  return request({
    url: "/parking/rule/dropList"
  });
}
//删除计费规则
export function delArea(id) {
  return request({
    url: `/parking/rule/${id}`,
    method: "delete"
  });
}
//回显
export function showArea(id) {
  return request({
    url: `/parking/area/${id}`
  });
}
//编辑计费规则
export function putArea(data) {
  return request({
    url: "/parking/area",
    method: "put",
    data
  });
}
